package cj.web.uc.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cj.web.uc.dao.MemberDAO;

@Service
public class MemberService {

	@Autowired
    private MemberDAO memberDAO;
	
	public int register(String phone,String pwd,Integer id){
		return memberDAO.register(phone, pwd, id);
	}
	
	public void updateMemberId(int memberId,String pwd){
		memberDAO.updateMemberId(memberId, pwd);
	}
	
	public void updateMemberId(int memberId,String name,String age,String sex,String career){
		memberDAO.updateMemberId(memberId, name, age, sex, career);
	}
	
	public int isRegister(String phone){
		return memberDAO.isRegister(phone);
	}
	
	public List<Map> getMemberByPhone(String phone){
		return memberDAO.getMemberByPhone(phone);
	}
	
	public List<Map> getMemberById(int id){
		return memberDAO.getMemberById(id);
	}
	
	public int getBuyerId(String phone){
		return memberDAO.getBuyerId(phone);
	}
	
	public String getPhoneById(int id){
		return memberDAO.getPhoneById(id);
	}
}